
h1 {
  font-size: 1em;
}
h2 {
  margin: 0;
  font-size: 0.8em;
}
.flex-demo {
  height: 200px;
}
.flex-demo > div {
  float: left;
  margin-left: 20px;
}
.flex-container {
  display: flex;
  width: 200px;
  height: 200px;
  border: 1px solid #000;
  transition: all 1s;
}
.flex-child {
  width: 60px;
  height: 60px;
  line-height: 60px;
  border-radius: 10px;
  color: #fff;
  font-size: 20px;
  text-align: center;
}
.flex-child:nth-of-type(1) {
  background-color: brown;
}
.flex-child:nth-of-type(2) {
  background-color:coral;
}
.flex-child:nth-of-type(3) {
  background-color: darkolivegreen;
}
.flex-child:nth-of-type(4) {
  background-color: rgb(165, 179, 141);
}
.flex-child:nth-of-type(5) {
  background-color: rgb(66, 180, 186);
}
.flex-child:nth-of-type(6) {
  background-color: rgb(197, 116, 49);
}
.flex-child:nth-of-type(7) {
  background-color: rgb(117, 17, 183);
}


.flex-item-demo .flex-child {
  font-size: 16px;
  line-height: 20px;
}

.flex-item-demo .flex-container[data-flex="grow"] {
  width: 400px;
}
.flex-item-demo .flex-container[data-flex="shrink"] {
  width: 300px;
}
.flex-item-demo .flex-container[data-flex="shrink"] > .flex-child {
  width: 120px;
}

.flex-item-demo .flex-container[data-flex="basis"] {
  width: 400px;
}

.flex-item-demo[data-flex="alignSelf"] .flex-container {
  align-items: flex-start;
}
.flex-item-demo[data-flex="alignSelf"] .flex-container .flex-child {
  line-height: 60px;
}
.flex-item-demo[data-flex="alignSelf"] .flex-container .flex-child:nth-of-type(2) {
  font-size: 60px;
}


details[data-flex="anim"] .flex-demo > div {
  float: auto;
  margin-left: 20px;
}
details[data-flex="anim"] .flex-demo .flex-container {
  width: auto;
}